﻿using EntityFrameworkETL.Interfaces;
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntityFrameworkETL.Test.Mocks
{
    public class ExecuteNonQueryMock : IExecuteNonQuery
    {
        public ExecuteNonQueryMock()
        {
            CallCount = 0;
        }

        public int CallCount { get; set; }
        public void Execute(string connectionString, string sql, params DbParameter[] parameters)
        {
            if (parameters.Count() > 2100)
            {
                throw new Exception("Parameter count Exceeds 2100 inside ExecuteNonQuery");
            }
            CallCount += 1;
        }
    }
}
